﻿<UserControl x:Class="Mnk.TBox.Plugins.LocalizationTool.Settings"
             xmlns:loc="clr-namespace:Mnk.TBox.Plugins.LocalizationTool.Code.Localization"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Units="clr-namespace:Mnk.Library.WpfControls.Components.Units;assembly=Mnk.Library.WPFControls"
             xmlns:wpfSyntaxHighlighter="clr-namespace:Mnk.Library.WpfSyntaxHighlighter;assembly=Mnk.Library.WPFSyntaxHighlighter"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <TabControl>
        <TabItem Header="{loc:Tr Languages}">
            <Units:ListBoxUnit Name="Languages" ItemsSource="{Binding Languages}" UnitType="Text" Title="{loc:Tr ConfigureLanguages}"/>
        </TabItem>
        <TabItem Header="{loc:Tr KeyValueFormats}">
            <Units:CheckableListBoxUnit Name="Formats" ItemsSource="{Binding Formats}" UnitType="Text" Title="{loc:Tr ConfigureFormats}"/>
        </TabItem>
        <TabItem Header="{loc:Tr Templates}">
            <DockPanel>
                <Units:ComboBoxUnit Name="Templates" ItemsSource="{Binding Templates}" SelectedIndex="{Binding SelectedTemplate}" UnitType="Text" Title="{loc:Tr ConfigureTemplates}" ValueCaption="{loc:Tr Template}"  DockPanel.Dock="Top"/>
                <GroupBox DataContext="{Binding ElementName=Templates, Path=SelectedValue}" IsEnabled="{Binding ElementName=Templates, Path=IsSelected}">
                    <wpfSyntaxHighlighter:SyntaxHighlighter Format="js" Text="{Binding Value}" />
                </GroupBox>
            </DockPanel>
        </TabItem>
    </TabControl>
</UserControl>
